import { request, RequestEnum } from "@/utils/request.js"

/**
 * - 商品相关接口 -
 */

// 分页查询商品
export const reqCommodityPage = data => request(`/commodity/select`, RequestEnum.GET, data)

// 查询具体的商品信息
export const reqCommodityById = ids => request(`/commodity/selectById/${ids}`, RequestEnum.GET)

// 根据商品类型查询
export const reqCommodityByType = data => request(`/commodity/selectByType`, RequestEnum.GET, data)

/**
 * - 商品标签相关接口 -
 */

// 返回所有商品标签
export const reqCommodityTagShow = () => request(`/commodityTagShow/showAllTag`, RequestEnum.GET)

// 根据商品标签分页查询商品
export const reqShopByCommodityTag = data => request(`/commodityTagShow/showAllCommodityByTag`, RequestEnum.GET, data)
